package com.rc.saas.tenant.service.hlhtsk;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseSearch;
import com.rc.saas.tenant.mapper.hlhtsk.HlhtskGovtTenantMapper;
import com.rc.saas.tenant.model.hlhtsk.HlhtskGovtTenant;
import com.rc.saas.tenant.model.hlhtsk.HlhtskGovtTenantExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author frog
 * @date 2021/4/20
 */
@Service
public class HlhtskGovtTenantServiceImpl implements HlhtskGovtTenantService {

    @Autowired
    private HlhtskGovtTenantMapper hlhtskGovtTenantMapper;

    @Override
    public HlhtskGovtTenantMapper getMapper() {
        return hlhtskGovtTenantMapper;
    }

    @Override
    public PageInfo<HlhtskGovtTenant> listPageHlhtskGovtTenant(BaseSearch baseSearch) {
        PageHelper.startPage(baseSearch.getOffset(), baseSearch.getLimit());
        HlhtskGovtTenantExample hlhtskGovtTenantExample = new HlhtskGovtTenantExample();
        List<HlhtskGovtTenant> hlhtskGovtTenants = hlhtskGovtTenantMapper.selectByExample(hlhtskGovtTenantExample);
        return new PageInfo<HlhtskGovtTenant>(hlhtskGovtTenants);
    }
}
